<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type='text/javascript' src='http://localhost/HDPHP/hdphp/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://localhost/HDPHP/hdphp/hdphp/Extend/Org/hdjs/hdui/css/hdui.css' rel='stylesheet' media='screen'>
<script src='http://localhost/HDPHP/hdphp/hdphp/Extend/Org/hdjs/hdui/js/hdui.js'></script>
<link href='http://localhost/HDPHP/hdphp/hdphp/Extend/Org/hdjs/hdvalidate/css/hdvalidate.css' rel='stylesheet' media='screen'>
<script src='http://localhost/HDPHP/hdphp/hdphp/Extend/Org/hdjs/hdvalidate/js/hdvalidate.js'></script>
<script src='http://localhost/HDPHP/hdphp/hdphp/Extend/Org/cal/lhgcalendar.min.js'></script>
<script src='http://localhost/HDPHP/hdphp/hdphp/Extend/Org/hdjs/hdslide/js/hdslide.js'></script>
<script type='text/javascript'>
HOST = 'http://localhost';
ROOT = 'http://localhost/me/12.6/second_shop/Eshop';
WEB = 'http://localhost/me/12.6/second_shop/Eshop/index.php';
URL = 'http://localhost/me/12.6/second_shop/Eshop/index.php/Admin/Goods/index';
APP = 'http://localhost/me/12.6/second_shop/Eshop/Eshop';
COMMON = 'http://localhost/me/12.6/second_shop/Eshop/Eshop/Common';
HDPHP = 'http://localhost/HDPHP/hdphp/hdphp';
HDPHPDATA = 'http://localhost/HDPHP/hdphp/hdphp/Data';
HDPHPEXTEND = 'http://localhost/HDPHP/hdphp/hdphp/Extend';
MODULE = 'http://localhost/me/12.6/second_shop/Eshop/index.php/Admin';
CONTROLLER = 'http://localhost/me/12.6/second_shop/Eshop/index.php/Admin/Goods';
ACTION = 'http://localhost/me/12.6/second_shop/Eshop/index.php/Admin/Goods/index';
STATIC = 'http://localhost/me/12.6/second_shop/Eshop/Static';
HDPHPTPL = 'http://localhost/HDPHP/hdphp/hdphp/Lib/Tpl';
VIEW = 'http://localhost/me/12.6/second_shop/Eshop/Eshop/Admin/View';
PUBLIC = 'http://localhost/me/12.6/second_shop/Eshop/Eshop/Admin/View/Public';
CONTROLLERVIEW = 'http://localhost/me/12.6/second_shop/Eshop/Eshop/Admin/View/Goods';
HISTORY = 'http://localhost/me/12.6/second_shop/Eshop/index.php/Admin/Index/left';
</script>
</head>
<body>
	<div class="wrap">
		<div class="menu_list">
			<ul>
				<li><a href="<?php echo U('index');?>" class="action">商品列表</a></li>
				<li><a href="<?php echo U('add');?>">商品添加</a></li>
			</ul>
		</div>
		<form action="" method="post">
			<table class="table2">
				<thead>
					<tr>
						<td class="w50">商品ID</td>
						<td>商品名称</td>
						<td>货号</td>
						<td>品牌ID</td>
						<td>价格</td>
						<td>上架</td>
				        <td>热门</td>
				        <td>新品</td>
				        <td>精品</td>
				        <td>栏目</td>
						<td class="w200">操作</td>
					</tr>
				</thead>
				<tbody>
					<?php $hd["list"]["d"]["total"]=0;if(isset($goods) && !empty($goods)):$_id_d=0;$_index_d=0;$lastd=min(1000,count($goods));
$hd["list"]["d"]["first"]=true;
$hd["list"]["d"]["last"]=false;
$_total_d=ceil($lastd/1);$hd["list"]["d"]["total"]=$_total_d;
$_data_d = array_slice($goods,0,$lastd);
if(count($_data_d)==0):echo "";
else:
foreach($_data_d as $key=>$d):
if(($_id_d)%1==0):$_id_d++;else:$_id_d++;continue;endif;
$hd["list"]["d"]["index"]=++$_index_d;
if($_index_d>=$_total_d):$hd["list"]["d"]["last"]=true;endif;?>

						<tr>
							<td><?php echo $d['gid'];?></td>
							<td><?php echo $d['goods_name'];?></td>
							<td><?php echo $d['goods_sn'];?></td>
							<td><?php echo $d['brand_id'];?></td>
							<td><?php echo $d['goods_price'];?></td>
				            <td><?php if($d['is_on_sale'] == 1){?>√<?php  }else{ ?>×<?php }?></td>
				            <td><?php if($d['is_hot']){?>√<?php  }else{ ?>×<?php }?></td>
				            <td><?php if($d['is_new']){?>√<?php  }else{ ?>×<?php }?></td>
				            <td><?php if($d['is_best']){?>√<?php  }else{ ?>×<?php }?></td>
           					<td><?php echo $d['cat_name'];?></td>
							<td>
								<a href="<?php echo U('edit',array('gid'=>$d['gid']));?>">编辑</a>|
								<a href="<?php echo U('del',array('gid'=>$d['gid']));?>">删除</a> |
								<a href="<?php echo U('Product/manage',array('goods_gid'=>$d['gid']));?>">货品</a>
							</td>
						</tr>
					<?php $hd["list"]["d"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>					
				</tbody>
			</table>		
		</form>
		
	</div>
</body>
</html>